import request from '@/utils/request'

// 创建应急队伍
export function createEmergencyRanks(data) {
  return request({
    url: '/biz/emergency-ranks/create',
    method: 'post',
    data: data
  })
}

// 更新应急队伍
export function updateEmergencyRanks(data) {
  return request({
    url: '/biz/emergency-ranks/update',
    method: 'put',
    data: data
  })
}

// 删除应急队伍
export function deleteEmergencyRanks(id) {
  return request({
    url: '/biz/emergency-ranks/delete?id=' + id,
    method: 'delete'
  })
}

// 获得应急队伍
export function getEmergencyRanks(id) {
  return request({
    url: '/biz/emergency-ranks/get?id=' + id,
    method: 'get'
  })
}

// 获得应急队伍分页
export function getEmergencyRanksPage(query) {
  return request({
    url: '/biz/emergency-ranks/page',
    method: 'get',
    params: query
  })
}

// 导出应急队伍 Excel
export function exportEmergencyRanksExcel(query) {
  return request({
    url: '/biz/emergency-ranks/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
